package com.nowcoder.community.dao;

import org.springframework.context.annotation.Primary;
import org.springframework.stereotype.Repository;

/**
 * @author szq
 * @create 2023-01-18 13:40
 * @description Spring入门案例
 */
@Repository  // 也可以根据bean name获取bean
@Primary    // 当容器中存在多个类型相同的Bean时，优先装配 -> 根据类型获取bean时，会获取标注了@Primary注解的bean
public class AlphaDaoMyBatisImpl implements AlphaDao {
    @Override
    public String select() {
        return "MyBatis";
    }
}
